package com.osgix.common.widget.extTree;

import java.util.ArrayList;
import java.util.List;

/**
 * @function Ext树模型
 * @author Azheng
 * Mar 26, 2009 7:30:21 AM
 */
public class ExtTree {
	private String id;
	private String text;
	private boolean leaf;
	private List<ExtTreeNode> children;

	public void addChildren(ExtTreeNode extTreeNode) {
		if (this.children == null) {
			children = new ArrayList<ExtTreeNode>();
		}
		this.children.add(extTreeNode);
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public List<ExtTreeNode> getChildren() {
		return children;
	}

	public void setChildren(List<ExtTreeNode> children) {
		this.children = children;
	}

	public boolean isLeaf() {
		return leaf;
	}

	public void setLeaf(boolean leaf) {
		this.leaf = leaf;
	}
}
